package br.com.fsa.aplication.Gui;

import java.io.IOException;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpSession;

@SessionScoped
@ManagedBean(name = "menuMBean" )
public class MenuMBean
{
	
	public void sair() throws IOException
	{
		HttpSession session = (HttpSession) FacesContext
				.getCurrentInstance().getExternalContext()
				.getSession(false);
		session.setAttribute("USUARIO", null);
		session.invalidate();
		
		FacesContext.getCurrentInstance().getExternalContext().redirect("/TransPort/Login.xhtml");
	}

}
